package com.qf.fronted.service.selectaddress.impl;


import com.qf.fronted.dao.selectaddress.IDistrictDao;
import com.qf.fronted.dao.selectaddress.impl.DistrictDaoImpl;
import com.qf.fronted.domain.District;
import com.qf.fronted.service.selectaddress.IDistrictService;

import java.sql.SQLException;
import java.util.List;

public class DistrictServiceImpl implements IDistrictService {

    private IDistrictDao iDistrictDao = new DistrictDaoImpl();

    //根据城市名获取地区
    @Override
    public List<District> getAllDistrictByCityId(Integer cityId) throws SQLException {
        return iDistrictDao.getAllDistrictByCityId(cityId);
    }

    @Override
    public List<District> getAllDistrictByCityName(String cityName) {
        return iDistrictDao.getAllDistrictByCityName(cityName);
    }
}
